package com.car.account.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.car.account.controller.form.storesForm.StoresCodeLoginForm;
import com.car.account.controller.form.storesForm.StoresPassLoginForm;
import com.car.account.dto.storesDto.ClerkDto;
import com.car.account.dto.storesDto.SelectClerkDto;
import com.car.account.dto.storesDto.StoresDto;
import com.car.account.entity.Stores;
import com.baomidou.mybatisplus.extension.service.IService;
import com.car.account.param.storesParam.InsertClerkParam;
import com.car.account.param.storesParam.SelectClerkDtoParam;
import com.car.account.param.storesParam.UpdateClerkRoleParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 董旭
 * @since 2024-08-28
 */
public interface StoresService extends IService<Stores> {

    Integer storesPassLogin(StoresPassLoginForm form)throws Exception;

    void sendStoresLoginCode(String clerkPhone)throws Exception;

    Integer storesCodeLogin(StoresCodeLoginForm form)throws Exception;

    ClerkDto selectClerkDto(Integer clerkId)throws Exception;

    Page<SelectClerkDto> selectClerks(SelectClerkDtoParam param)throws Exception;

    void clerkUpdatePass(Integer clerkId, String clerkPass)throws Exception;

    String clerkUpdateImage(MultipartFile mf, Integer clerkId)throws Exception;

    void clerkUpdatePhone(Integer clerkId, String clerkPhone)throws Exception;

    void insertClerk(InsertClerkParam param)throws Exception;

    List<StoresDto> findsClerksByIds(Integer currentClerkId, Set<Integer> clerkIds)throws Exception;

    void disableClerk(Integer currentClerkId, Integer clerkId)throws Exception;

    void enableClerk(Integer currentClerkId, Integer clerkId)throws Exception;

    Integer findStoresIdByClerkId(Integer clerkId)throws Exception;

    Integer selectStoresRole(Integer currentClerkId, Integer clerkId)throws Exception;

    void updateClerkRole(UpdateClerkRoleParam param)throws Exception;
}
